Page({

  /**
   * 页面的初始数据
   */
  data: {
    officelist:[
      {
        titles:"常见科室",
        list:[
          { imgs: "https://img1.dxycdn.com/2019/0704/659/3354855047225221455-22.png", text: "皮肤科" },
          { imgs: "https://img1.dxycdn.com/2019/0704/930/3354855751599869975-22.png", text: "儿科" },
          { imgs: "https://img1.dxycdn.com/2019/0704/168/3354855768779739459-22.png", text: "妇产科" },
          { imgs: "https://img1.dxycdn.com/2019/0704/130/3354855790254576290-22.png", text: "泌尿外科" },
          { imgs: "https://img1.dxycdn.com/2019/0704/930/3354855813876896824-22.png", text: "骨科" },
          { imgs: "https://img1.dxycdn.com/2019/0704/554/3354855835351733668-22.png", text: "消化内科" },
          { imgs: "https://img1.dxycdn.com/2019/0813/768/3362297521174629469-22.png", text: "性病科" },
          { imgs: "https://img1.dxycdn.com/2019/0704/265/3354855856826570582-22.png", text: "口腔科" },
          { imgs: "https://img1.dxycdn.com/2019/0704/604/3354855878301407451-22.png", text:"耳鼻咽喉科"},
        ]
      }, {
        titles: "内科",
        list: [
          { imgs: "https://img1.dxycdn.com/2019/0704/871/3354855279153459358-22.png", text: "呼吸内科" },
          { imgs: "https://img1.dxycdn.com/2019/0704/279/3354855311365714655-22.png", text: "普通内科" },
          { imgs: "https://img1.dxycdn.com/2019/0704/776/3354855390822611036-22.png", text: "感染科 传染科" },
          { imgs: "https://img1.dxycdn.com/2019/0704/423/3354855128829601365-22.png", text: "内分泌科" },
          { imgs: "https://img1.dxycdn.com/2019/0704/699/3354855163189340372-22.png", text: "心血管内科" },
          { imgs: "https://img1.dxycdn.com/2019/0704/573/3354855191106628285-22.png", text: "神经内科" },
          { imgs: "https://img1.dxycdn.com/2019/0704/864/3354855264121073563-22.png", text: "肾脏内科" },
          { imgs: "https://img1.dxycdn.com/2019/0704/323/3354855332840551497-22.png", text: "风湿免疫科" },
          { imgs: "https://img1.dxycdn.com/2019/0704/799/3354855354315388443-22.png", text: "血液科" },
        ]
      }, {
        titles: "外科",
        list: [
          { imgs: "https://img1.dxycdn.com/2019/0704/680/3354855433772284675-22.png", text: "神经外科" },
          { imgs: "https://img1.dxycdn.com/2019/0704/117/3354855470279507267-22.png", text: "心胸外科" },
          { imgs: "https://img1.dxycdn.com/2019/0704/134/3354855498196795112-22.png", text: "肝胆胰腺外科" },
          { imgs: "https://img1.dxycdn.com/2019/0704/284/3354855515376664596-22.png", text: "甲状腺乳腺外科" },
          { imgs: "https://img1.dxycdn.com/2019/0704/692/3354855547588919912-22.png", text: "普外科" },
        ]
      },
    ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var bgc = wx.getStorageSync('color')
    wx.setNavigationBarColor({
      frontColor: "#ffffff",
      backgroundColor: bgc,
    })
    if (options.long){
      wx.setNavigationBarTitle({
        title: '科室选择',
      })
      this.setData({
        long: options.long
      })
    }else{
      wx.setNavigationBarTitle({
        title: '问医生',
      })
    }
  },
  handleTap(e){
    wx.navigateTo({
      url: '/hyb_yl/userCommunicate/pages/changeDoctor/changeDoctor?tit=' + e.currentTarget.dataset.tit + '&long=' + this.data.long,
    })
  },
  /**
   * 生命周期函数--监听页面初次渲染完成   
   */
  onReady: function () {
    
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
    
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
    
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
    
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
    
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
    
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
    
  }
})